public class ValueArray
{

  private int[][] array;
  private int width;
  private int height;
  
  public ValueArray(int x, int y)
  {
    array = new int[x][y];
	width = x;
	height = y;
  }
  
  public void setValue(int x, int y, int value)
  {
    array[x][y] = value;
  }
  
  public int getValue(int x, int y)
  {
    return array[x][y];
  }
  
  public String toString()
  {
    String result = "\n";
    for ( int r = 0 ; r < width ; r++ )
    {
      for ( int c = 0 ; c < height ; c++ )
        result += array[r][c];
      result += "\n";
    }
    result += "\n";
    return result;
  }

}